﻿using Dotnet.Code;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sui.Domain.App
{
    public class WxPdfExcel : BaseExcel
    {
        public WxPdfExcel(string path) : base(path) { }

        public override void Transfer(ExcelToTableArgs e)
        {
            DataRow baseDr = _excelDataTable.NewRow();
            baseDr["交易号"] = e.CurrDataRow["交易单号"];
            baseDr["交易创建时间"] = e.CurrDataRow["交易时间"];
            baseDr["类型"] = e.CurrDataRow["交易类型"];
            baseDr["收/支"] = e.CurrDataRow["收/支/其他"];
            //string sz= e.CurrDataRow["收/支"].ToString().Trim();
            //baseDr["收/支"] = sz == "/" ? "转账" : sz;
            baseDr["交易来源地"] = e.CurrDataRow["交易方式"];
            baseDr["金额（元）"] = e.CurrDataRow["金额(元)"];
            baseDr["交易对方"] = e.CurrDataRow["交易对方"];/////
            baseDr["商家订单号"] = e.CurrDataRow["商户单号"];
            baseDr["交易状态"] = "支付成功";
            

            _excelDataTable.Rows.Add(baseDr);
            e.CurrDataTable = _excelDataTable;
            e.CurrDataRow = baseDr;
        }
    }
}
